.class public Lcom/nibiru/launcher3d/LauncherApplication;
.super Lx/core/GlobalApplication;
.source "LauncherApplication.java"


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 19
    invoke-direct {p0}, Lx/core/GlobalApplication;-><init>()V

    return-void
.end method

.method private getPassword()V
    .registers 8

    .prologue
    .line 42
    const/4 v0, 0x0

    .line 44
    .local v0, "context":Landroid/content/Context;
    :try_start_1
    iget-object v4, p0, Lcom/nibiru/launcher3d/LauncherApplication;->context:Landroid/content/Context;

    const-string v5, "com.android.nibiru.settings.vr"

    const/4 v6, 0x2

    invoke-virtual {v4, v5, v6}, Landroid/content/Context;->createPackageContext(Ljava/lang/String;I)Landroid/content/Context;
    :try_end_9
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_1 .. :try_end_9} :catch_1d

    move-result-object v0

    .line 49
    :goto_a
    if-eqz v0, :cond_1c

    .line 50
    const-string v4, "settings_pw"

    const/4 v5, 0x5

    .line 51
    invoke-virtual {v0, v4, v5}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v2

    .line 52
    .local v2, "mSharedPreferences":Landroid/content/SharedPreferences;
    const-string v4, "password"

    const/4 v5, 0x0

    invoke-interface {v2, v4, v5}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 53
    .local v3, "password":Ljava/lang/String;
    sput-object v3, Lcom/nibiru/launcher3d/utils/LauncherHelper;->password:Ljava/lang/String;

    .line 55
    .end local v2  # "mSharedPreferences":Landroid/content/SharedPreferences;
    .end local v3  # "password":Ljava/lang/String;
    :cond_1c
    return-void

    .line 46
    :catch_1d
    move-exception v1

    .line 47
    .local v1, "e":Landroid/content/pm/PackageManager$NameNotFoundException;
    const-string v4, "name no found"

    invoke-static {v4}, Lcom/nibiru/launcher3d/utils/LogUtil;->log(Ljava/lang/String;)V

    goto :goto_a
.end method


# virtual methods
.method public getLauncherScene()Ljava/lang/Class;
    .registers 6

    .prologue
    .line 29
    iget-object v2, p0, Lcom/nibiru/launcher3d/LauncherApplication;->context:Landroid/content/Context;

    const-string v3, "Device"

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v4}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v0

    .line 30
    .local v0, "pref":Landroid/content/SharedPreferences;
    const-string v2, "ShowPassword"

    const/4 v3, 0x1

    invoke-interface {v0, v2, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v1

    .line 32
    .local v1, "showPassword":Z
    invoke-direct {p0}, Lcom/nibiru/launcher3d/LauncherApplication;->getPassword()V

    .line 33
    sget-object v2, Lcom/nibiru/launcher3d/utils/LauncherHelper;->password:Ljava/lang/String;

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_20

    if-eqz v1, :cond_20

    .line 34
    const-class v2, Lcom/nibiru/launcher3d/scene/LauncherPasswordScene;

    .line 37
    :goto_1f
    return-object v2

    :cond_20
    const-class v2, Lcom/nibiru/launcher3d/scene/LauncherScene;

    goto :goto_1f
.end method

.method public onCreate()V
    .registers 2

    .prologue
    .line 22
    invoke-super {p0}, Lx/core/GlobalApplication;->onCreate()V

    .line 24
    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/nibiru/launcher3d/LauncherApplication;->setIsLauncher(Z)V

    .line 25
    return-void
.end method

.method public resetSystem()V
    .registers 2

    .prologue
    .line 63
    iget-object v0, p0, Lcom/nibiru/launcher3d/LauncherApplication;->context:Landroid/content/Context;

    check-cast v0, Lcom/nibiru/lanchuer/Lanchuer2DActivity;

    invoke-virtual {v0}, Lcom/nibiru/lanchuer/Lanchuer2DActivity;->resetSystem()V

    .line 64
    return-void
.end method
